import json

point_list = []
data_list = []
with open('wine_data_v3.json', 'r') as f:
    for a in f:
        a = json.loads(a)
        data_list.append(a.copy())
        point_list.append(float(a.pop('points')))

point_max = max(point_list)
point_min = min(point_list)

i = 0
for point in point_list:
    point = (float(point) - float(point_min)) / (float(point_max) - float(point_min))
    data_list[i]['points'] = point
    print(data_list[i])
    i = i + 1

with open('wine_data_v4.json', 'w') as f:
    for data in data_list:
        f.write(json.dumps(data) + '\r')
